@if (content && config && config.enable) {
  <button mat-button extended [mat-menu-trigger-for]="menu">
    <app-icon [content]="config.icon"></app-icon>
    <span>{{ config.label }}</span>
  </button>
  <mat-menu #menu="matMenu">
    @if (canAccess) {
      @for (item of content.elements; track item) {
        <button mat-menu-item>
          <app-icon [content]="item.icon"></app-icon>
          <a target="_blank" href="{{ item.href }}">{{ item.label }}</a>
        </button>
      }
    } @else {
      @if (!user.authenticated) {
        <button mat-menu-item>
          <app-icon [content]="{ name: 'person' }"></app-icon>
          <a href="javascript:vovid(0)" (click)="openLogin()">登录</a>
        </button>
      }
    }
  </mat-menu>
}
